package com.jumper.study.db.dto;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.jumper.study.common.api.SortType;


public class StudentStudyLogSearchDto implements Serializable {
    private Long accountId;

    private Long lessonId;

    private LocalDateTime startDate;

    private LocalDateTime endDate;

    private SortType sortType;

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public Long getLessonId() {
        return lessonId;
    }

    public void setLessonId(Long lessonId) {
        this.lessonId = lessonId;
    }

    public LocalDateTime getStartDate() {
        if (startDate != null) {
            startDate = startDate.withHour(0).withMinute(0).withSecond(0);
        }
        return startDate;
    }

    public void setStartDate(LocalDateTime startDate) {
        this.startDate = startDate;
    }

    public LocalDateTime getEndDate() {
        if (endDate != null) {
            endDate = endDate.withHour(23).withMinute(59).withSecond(59);
        }
        return endDate;
    }

    public void setEndDate(LocalDateTime endDate) {
        this.endDate = endDate;
    }

    public SortType getSortType() {
        return sortType;
    }

    public void setSortType(SortType sortType) {
        this.sortType = sortType;
    }
}
